#pragma once

typedef struct _vus_keyframe vus_keyframe;
typedef struct _vus_keyframe_list vus_keyframe_list;

/**
 * Creates a new keyframe list.
 *
 * @return A non-null keyframe list.
 */
VENTUS_EXPORT vus_keyframe_list *vus_keyframe_list_alloc();

/**
 * Deletes a keyframe list.
 *
 * @param self The keyframe list.
 */
VENTUS_EXPORT void vus_keyframe_list_free(vus_keyframe_list *self);

/**
 * Adds a keyframe to a keyframe list.
 *
 * @param self The keyframe list.
 * @param value The keyframe to add.
 */
VENTUS_EXPORT void vus_keyframe_list_add(vus_keyframe_list *self, vus_keyframe value);

/**
 * Removes a keyframe from a keyframe list.
 *
 * @param self The keyframe list.
 * @param value The keyframe to remove.
 */
VENTUS_EXPORT void vus_keyframe_list_remove(vus_keyframe_list *self, vus_keyframe value);

/**
 * Clears a keyframe list.
 *
 * @param self The keyframe list.
 */
VENTUS_EXPORT void vus_keyframe_list_clear(vus_keyframe_list *self);

/**
 * Gets the number of keyframes in a keyframe list.
 *
 * @param self The keyframe list.
 * @return The number of keyframes in the list.
 */
VENTUS_EXPORT uint vus_keyframe_list_count(vus_keyframe_list *self);

/**
 * Gets an item in a keyframe list.
 *
 * @param self The keyframe list.
 * @param index The index of the item to get.
 * @return A keyframe in the list.
 */
VENTUS_EXPORT vus_keyframe vus_keyframe_list_get(vus_keyframe_list *self, uint index);

/**
 * Sets an item in a keyframe list.
 *
 * @param self The keyframe list.
 * @param index The index of the item to set.
 * @param value The value to set the keyframe to.
 */
VENTUS_EXPORT void vus_keyframe_list_set(vus_keyframe_list *self, uint index, vus_keyframe value);

/**
 * Gets the index at which a keyframe appears in a keyframe list.
 *
 * @param self The keyframe list.
 * @param value The value to look for.
 * @return -1 if value does not exist in self, otherwise the first index at which value appears in self.
 */
VENTUS_EXPORT int vus_keyframe_list_index_of(vus_keyframe_list *self, vus_keyframe value);
